//
//  TabBarController.m
//  BCTabbarDemo
//
//  Created by Wythe Zhou on 3/4/15.
//  Copyright (c) 2015 demo. All rights reserved.
//

#import "TabBarController.h"
#import "AViewController.h"
#import "BViewController.h"
#import "CViewController.h"
#import "DViewController.h"

@interface TabBarController ()

@end

@implementation TabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor cyanColor];
    
    AViewController *avc = [[AViewController alloc] init];
    BViewController *bvc = [[BViewController alloc] init];
    CViewController *cvc = [[CViewController alloc] init];
    DViewController *dvc = [[DViewController alloc] init];
    
    UITabBarItem *aItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0];
    UITabBarItem *bItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemContacts tag:1];
    UITabBarItem *cItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:2];
    UITabBarItem *dItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:3];

    avc.tabBarItem = aItem;
    bvc.tabBarItem = bItem;
    cvc.tabBarItem = cItem;
    dvc.tabBarItem = dItem;
    
    self.viewControllers = @[avc, bvc, cvc, dvc];
}



@end
